package com.xjc.controller;

import com.xjc.pojo.Person;
import com.xjc.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * @author:谢君臣
 * @Date:2021/6/6-11:15
 * @version:1.0
 * @function:
 */
@Controller
public class PersonController {

    @Autowired
    private PersonService personService;

    @Transactional
    @GetMapping("/getList")
    public List<Person> getList(){
        List<Person> listPerson = personService.getListPerson();
        return listPerson;
    }
}
